Setting the Font Weight

The font-weight property allows you to set the font weight of the text present on an HYML Web page. You can use this property to add the boldness to the text.

Let’s do the following steps to set the font weight of the text present on an HTML Web page:


<!DOCTYPE html>
<html>
<head>
<title>Setting the Font Weight</title>
    <style type=”text/css”>
    p {font-weight: normal}
    div {font-weight: bold}
    </style>
</head>
<body>
    <p>This is normal text.</p>
    <div>This text is bold. </div>
</body>
</html> 

Save the document with the name FontWeight.html and open on browser.